<?php
/**
 * Author: 孙武 QQ:1228746736
 * Date: 2018/2/12
 * Time: 10:13
 */
namespace app\home\model;
class Downloads extends Base{
    protected $pk='PK_DownloadsGuid';
    protected $table='rs_downloads';

    public function resource()
    {
        //用当前表的FK_ResourceGuid关联resource便的PK_ResourceGuid进行查询
        return $this->hasOne('resource','PK_ResourceGuid',"FK_ResourceGuid");
    }
}